using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using Northwind.NET.FE.Reports;
 
namespace Northwind.NET.FE.Forms
{
    public partial class ProductsForm : Form
    {
        public ProductsForm()
        {
            InitializeComponent();
        }

        private void ProductsForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            Northwind.NET.FE.Globals.Navigator.UnhideMainSwitchboard();
        }

        private void productBindingNavigatorSaveItem_Click(object sender, EventArgs e)
        {
            this.Validate();
            this.productBindingSource.EndEdit();
            this.tableAdapterManager.UpdateAll(this.dataModelDataSet);

        }

        private void ProductsForm_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'dataModelDataSet.Category' table. You can move, or remove it, as needed.
            this.categoryTableAdapter.Fill(this.dataModelDataSet.Category);
            // TODO: This line of code loads data into the 'dataModelDataSet.Supplier' table. You can move, or remove it, as needed.
            this.supplierTableAdapter.Fill(this.dataModelDataSet.Supplier);
            // TODO: This line of code loads data into the 'dataModelDataSet.Product' table. You can move, or remove it, as needed.
            this.productTableAdapter.Fill(this.dataModelDataSet.Product);

        }

        private AlphabeticalListOfProductsReport _report;
        private void previewProductListButton_Click(object sender, EventArgs e)
        {
            //MessageBox.Show("TODO!");

            _report = new AlphabeticalListOfProductsReport();
            _report.Show();  
        }

        private void htmlOutpurButton_Click(object sender, EventArgs e)
        {
            MessageBox.Show("TODO!");  
        }
    }
}